/**
 * @name 权限
 */
layui.define(['larry', 'form', 'table'], function(exports) {
    "use strict";
    var $ = layui.$,
        larry = layui.larry,
        form = layui.form,
        table = layui.table;
    //图标选择
    $('#icon').on('click', function() {
        layer.open({
            type: 2,
            title: '图标选择',
            shadeClose: true,
            shade: 0.8,
            area: ['100%', '100%'],
            content: '/backend/system/upms/permissions/larryfont' //iframe的url
        });
    });
    //监听提交
    form.on('submit(permissionsAdd)', function(data) {
    		$.post("/backend/system/upms/permissions/addPermissions",data.field,function(result){
    			if(result.status != 200){
    				layer.msg(result.msg);
    			} else {
    				parent.layer.closeAll();
			}
    		});
        return false;
    });
    exports('mypanel', {});
});